function memberListDialog(
    {
        userId,
        callback = Function()
    }
) {

    if (!userId) {
        return $.toast("用户ID不能为空");
    }

    const $widget = $(`
        <div>
            <form data-form="search">
                <input type="hidden" name="userId" value="${userId}">
                <div class="audit-top pt0 pl0">
                    <a data-btn="addMember" class="search-btn ml-10 btn-line" href="javascript:" >新增</a>
                </div>
            </form>
            <div data-list="content" class="table-con" style="box-shadow: none;padding: 10px 0 0 0"></div>
        </div>
    `);

    const $dialogWidget = $.dialog($widget, {
        title: "成员列表",
        width: "80%",
        cancel: null,
        ok: null
    })

    $dialogWidget.find('[data-type="content"]').css({
        "max-height": "600px",
        "overflow": "auto"
    })

    const $searchForm = $widget.find('[data-form="search"]');
    const $listWarp = $widget.find('[data-list="content"]');

    const listHandler = $.commonList({
        $warp: $listWarp,
        column: [
            {title: "成员", value: "memberName"},
            {title: "手机", value: "phone"},
            {title: "邮箱", value: "email"},
            {title: "默认成员", value: ({defaultFlag}) => defaultFlag === 1 ? "默认" : ""},
            {
                title: "操作", value: data => {
                    const {memberId,memberName, defaultFlag} = data;
                    const $updBtn = $('<a href="javascript:" class="c-btn btn-blue m5">编辑</a>');
                    const $setDefBtn = $('<a href="javascript:" class="c-btn btn-blue m5">设为默认</a>');
                    const $delBtn = $('<a href="javascript:" class="c-btn btn-red m5">删除</a>');

                    $updBtn.on("click", () => {
                        updMemberDialog({
                            memberId,
                            callback() {
                                listHandler.getPage();
                                callback();
                            }
                        })
                    })

                    $setDefBtn.on("click", () => {
                        setDefaultMemberDialog({
                            memberId,
                            memberName,
                            callback() {
                                listHandler.getPage();
                                callback();
                            }
                        });
                    });

                    $delBtn.on("click", () => {
                        delMemberDialog({
                            memberId,
                            memberName,
                            callback() {
                                listHandler.getPage();
                                callback();
                            }
                        })
                    })

                    //控制操作按钮
                    const $dom = $('<div></div>');
                    $dom.append($updBtn);
                    if (defaultFlag !== 1) {
                        $dom.append($setDefBtn);
                        $dom.append($delBtn);
                    }

                    return $dom;
                }
            },
        ],
        dataSource: (currPage, callback) => {
            const param = $.getFormData($searchForm);
            param.pageIndex = currPage;
            param.pageSize = 10;
            queryMemberList(param, ({Code, Message, Result = [], Total}) => {
                if (Code !== 10000) {
                    return callback(Message, 0);
                }

                return callback(Result, Total, param.pageSize);
            });
        }
    });

    $searchForm.find('[data-btn=addMember]').on("click", () => {
        addMemberDialog({
            userId,
            callback() {
                listHandler.getPage();
                callback();
            }
        })
    })

    return $dialogWidget;

    function queryMemberList(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Member/queryMemberList"
        }, callback)
    }

}